package xyz.xtt.admin.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import xyz.xtt.admin.service.IPayOrderService;
import xyz.xtt.admin.vo.PayOrderVo;
import xyz.xtt.common.response.ApiResult;

import java.util.List;

/**
 * <p>
 * 支付订单主表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-01-21
 */
@RestController
@RequestMapping("/api/admin/pay_order")
public class PayOrderController {

    @Autowired
    private IPayOrderService payOrderService;

    @GetMapping("/list")
    public ApiResult<Page<PayOrderVo>> list(@RequestParam(value = "current", defaultValue = "1") Integer current,
                                            @RequestParam(value = "page", defaultValue = "20") Integer page,
                                            String phone, String appUserId) {
        return ApiResult.ok(payOrderService.getList(current, page,phone, appUserId));
    }
}
